{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# FIRST STEPS IN QISKIT\n",
    "\n",
    "In this notebook, we are going to learn how to use Qiskit to define a simple circuit and to execute it on both simulators and the quantum computers of the IBM Quantum Experience.. \n",
    "\n",
    "We start by importing the necessary packages."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Acer\\.conda\\envs\\name_of_my_env\\lib\\site-packages\\numpy\\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:\n",
      "C:\\Users\\Acer\\.conda\\envs\\name_of_my_env\\lib\\site-packages\\numpy\\.libs\\libopenblas.NOIJJG62EMASZI6NYURL6JBKM4EVBGM7.gfortran-win_amd64.dll\n",
      "C:\\Users\\Acer\\.conda\\envs\\name_of_my_env\\lib\\site-packages\\numpy\\.libs\\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll\n",
      "  warnings.warn(\"loaded more than 1 DLL from .libs:\\n%s\" %\n"
     ]
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "from qiskit import *\n",
    "from qiskit.visualization import *\n",
    "from qiskit.tools.monitor import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Defining the circuit\n",
    "\n",
    "Now, we are going to define a very simple circuit: we will use the $H$ gate to put a qubit in superposition and then we will measure it"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAL4AAAB7CAYAAADKUTqaAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAI+klEQVR4nO3dfUhUawLH8d/4cn1pzMYmNc1exqlopqu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yZSoQEqdHZ8xydPc+Ht3/6fWfPc8xU+o4ZPQCEhYVJVvj29nbMmzdPnonbAcMX3PfrY+D1lee4+7gpFPiTIXbcfaKjo2GxWPDo0SMAwNmzZ5GYmGi3edobwxec3wxfGFavGHef2JV6BKpV4+7j7u6O0tJSJCcnIzw8HEqlEunp6facql3xc3UIb4aGcLy0HC9++XXEYz7eXjiQnQJfH+9Rnum6uOITPD08EG/4dtTH/rg2atpFDzgw/GvXrmHTpk0IDAyEl5cXFixYgNTUVDQ2NjpqCjSO5UsWYVHYXMm2OQGzEPuNzkkzkpfs4Q8NDSEtLQ2bN29GY2MjEhMTsXfvXqxYsQIVFRV49uyZ3FOgSVAoFNj0h9X4+HZxm76Lhbv79DwokP0YPycnByUlJdi1axeOHz8OD48Pbx1YLBb4+/vDz8/PLmO9/7xHEtdkP+tT1jew7ty5g5KSEsTFxeHEiRMjbj/5Jb/OS9ObrCt+UlISTCYTGhoaEBkZOfET6IvQ/XMfgiZ4+dLVyRq+n58f1Go12tra5BpCgoc6NNlDHdnOXPr7+zEwMICFCxfKNQTRlMm24vf19SEgIAA6nQ4PHz6UYwiiKZNtxVepVNBoNDCbzaiurh7x+OPHj+UammhCsh7jl5WVISUlBR4eHkhISEB4eDh6enpQV1cHnU6Hq1evyjU00bhkfx3/1q1bOHr0KOrr6zE4OIjAwECsWrUKeXl5WLdunZxDE42JF6mRkKbn+9FEE2D4JCSGT0Ji+CQkhk9CYvgkJIZPQmL4JCSGT0Ji+CQkhk9CYvgkJIZPQmL4JCSGT0Ji+CQkhk9CYvgkJIZPQmL4JCSGT0Ji+CQkhk9CYvgkJIZPQmL4JCSGT0L6P4c4i3QK8eFeAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 233.576x144.48 with 1 Axes>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Let's create a circuit to put a state in superposition and measure it\n",
    "\n",
    "circ = QuantumCircuit(1,1) # We use one qubit and also one classical bit for the measure result \n",
    "\n",
    "circ.h(0) #We apply the H gate\n",
    "\n",
    "circ.measure(range(1),range(1)) # We measure\n",
    "\n",
    "circ.draw(output='mpl') #We draw the circuit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also very easily obtain the *qasm* code for the circuit."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OPENQASM 2.0;\n",
      "include \"qelib1.inc\";\n",
      "qreg q[1];\n",
      "creg c[1];\n",
      "h q[0];\n",
      "measure q[0] -> c[0];\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(circ.qasm())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Running the circuit on simulators\n",
    "\n",
    "Once that we have defined the circuit, we can execute it on a simulator. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'0': 517, '1': 507}\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAAE1CAYAAACFhLtpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAf+ElEQVR4nO3df5xV9X3n8ddHpo4kQAMYIAwYQIEK6CCOmYwhYLNStmbDNjEbY9qahKqb2GgTm92kW7XRpDFb20SNzaYhfVSlNrHGbeOaGrFpEVEyZKASAYNsAAOEH+FHIkQcZPz0j3uh4zgD58KdH8Dr+Xjcx9z7Pd/znc95XO68Oed8z7mRmUiSpCM7pbcLkCTpeGFoSpJUkKEpSVJBhqYkSQUZmpIkFWRoSpJUkKEpSVJBPR6aEXFNRKyPiJciYllEvP0I/U+NiFvK67RGxE8i4roOfS6NiNXl5asj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x/lmJIkHZWePjz7RWB+RCwFnqQ0O3Yk8FWAiLgXIDOvKPf/KvCxiLgd+CvgbcCHgMuLjilJUrX0aGhm5v0RMRS4AXgTsBK4JDOfL3c5o0P/9RFxCfAlSpeQ/BS4LjMfrGBMVZeHtqXji5/ZKorM7O0aJEk6LnjvWUmSCjI0JUkqyNCUJKkgQ1NHFBHjI6LjtbCSdNJxIpA6FRHDgN8FPgH8jNINJbYA3wIezMxf9mJ5ktQrDE11KiLuBiYBDwM7gaHAVOBsYBPwZ5n5WG/VJ+m1ImIQsCf9w95tDE29RkQEsIfS9a6L2rWNAt4KXEXp3oyXZebTvVWnpFeLiL8ClpYfz2fmC530GZqZO3u8uBOE5zTVmUnAemD/wYYs2ZiZDwD/hVKoXtZL9UnqICIup/Qf2r8Avg3cFhHvjogzI6J/uU9/4K8j4pxeLPW45p6mXqP8wXoYeB1wBfDjzHylQ59rgd/LzKk9X6GkjiJiHqUvsPgz4D3AB4EzgTXAPwHfAyYCd2Tmqb1V5/HOPU29RmbuA/4Y6A/cC1wREaMjYgBARLwOmEnploWSellE1FA6OvTzzFyXmX+emecAFwCPUwrQvwe+DMzvvUqPf+5pqksRMQW4EZgD/JLSt878DLiY0kzaKzPzmd6rUNJBETEYGJ6ZP4qIU4GX208IiojLgG8A05yLcPQMTR1R+fKTdwK/BbxEaQ/zgcz8UW/WJenwIuIUSn/n2yLiKkqHZl/X23UdzwxNVSQiTul4flNS3xcR1wP9MvO23q7leGZoStJJICJ+BWjzP73HxtCUJKkgZ89KklSQoSlJUkGGpiRJBRmakiQVZGhKklSQoSlJUkH/DlpHYniiy7K1AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Executing on the local simulator\n",
    "\n",
    "backend_sim = Aer.get_backend('qasm_simulator') # We choose the backend\n",
    "\n",
    "job_sim = execute(circ, backend_sim, shots=1024) # We execute the circuit, selecting the number of repetitions or 'shots'\n",
    "\n",
    "result_sim = job_sim.result() # We collect the results\n",
    "\n",
    "counts = result_sim.get_counts(circ) # We obtain the frequency of each result and we show them \n",
    "print(counts) \n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also run the circuit run the circuit with a simulator that computes the final state. For that, we need to create a circuit with no measures "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.70710678+0.j 0.70710678+0.j]\n"
     ]
    }
   ],
   "source": [
    "# Execution to the get the statevector\n",
    "\n",
    "circ2 = QuantumCircuit(1,1)\n",
    "\n",
    "circ2.h(0)\n",
    "\n",
    "backend = Aer.get_backend('statevector_simulator') # We change the backend\n",
    "\n",
    "job = execute(circ2, backend) # We execute the circuit with the new simulator. Now, we do not need repetitions\n",
    "\n",
    "result = job.result() # We collect the results and access the stavector \n",
    "outputstate = result.get_statevector(circ2)\n",
    "print(outputstate)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Finally, we can also obtain the unitary matrix that represents the action of the circuit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 0.70710678+0.00000000e+00j  0.70710678-8.65956056e-17j]\n",
      " [ 0.70710678+0.00000000e+00j -0.70710678+8.65956056e-17j]]\n"
     ]
    }
   ],
   "source": [
    "backend = Aer.get_backend('unitary_simulator') # We change the backend again\n",
    "\n",
    "job = execute(circ2, backend) # We execute the circuit\n",
    "\n",
    "result = job.result() # We collect the results and obtain the matrix\n",
    "unitary = result.get_unitary()\n",
    "print(unitary)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, we are going to use the quantum computers at the IBM Quantum Experience to use our circuit "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "ibmqfactory.load_account:WARNING:2020-11-07 01:29:12,235: Credentials are already in use. The existing account in the session will be replaced.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'backend_name': 'ibmq_qasm_simulator', 'backend_version': '0.1.547', 'operational': True, 'pending_jobs': 1, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmqx2', 'backend_version': '2.2.1', 'operational': True, 'pending_jobs': 689, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_16_melbourne', 'backend_version': '2.3.2', 'operational': True, 'pending_jobs': 377, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_vigo', 'backend_version': '1.3.0', 'operational': True, 'pending_jobs': 20, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_ourense', 'backend_version': '1.3.0', 'operational': True, 'pending_jobs': 14, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_valencia', 'backend_version': '1.4.0', 'operational': True, 'pending_jobs': 62, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_armonk', 'backend_version': '1.1.1', 'operational': True, 'pending_jobs': 0, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_athens', 'backend_version': '1.2.1', 'operational': True, 'pending_jobs': 2, 'status_msg': 'active'}\n",
      "{'backend_name': 'ibmq_santiago', 'backend_version': '1.1.1', 'operational': True, 'pending_jobs': 31, 'status_msg': 'active'}\n"
     ]
    }
   ],
   "source": [
    "# Connecting to the real quantum computers\n",
    "\n",
    "provider = IBMQ.load_account() # We load our account \n",
    "provider.backends() # We retrieve the backends to check their status\n",
    "\n",
    "for b in provider.backends():\n",
    "    print(b.status().to_dict())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can execute the circuit on IBM's quantum simulator (supports up to 32 qubits). We only need to select the appropriate backend."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'0': 534, '1': 490}\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAAEyCAYAAACYgYvRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3de5SV9X3v8fdXJiAp0CqWyzBEQC5ySUbHIXRSBNOGmpjUWmy8rCStSdSY9OiyrpzTk9P0pE1SNYlJtZocGlOPqW00VeNKGjGRmoLBzBkzkJIAKdAyUEAuEW2BiCD4PX/sPWQzzMAzsucCvF9rzXLv3/N7nv19HPd8/D2X3xOZiSRJOrbT+roASZJOFIamJEkFGZqSJBVkaEqSVJChKUlSQYamJEkF1fR1AX3prLPOynHjxvV1GZKkfmTZsmXPZ+avdrbslA7NcePG0dra2tdlSJL6kYjY2NUyD89KklSQoSlJUkGGpiRJBRmakiQVZGhKklRQr4dmRHwkItoi4uWIWBYRFx6jf0TEzRHxrxGxLyK2RsTtHfrMLW/r5YhYHxE39OxeSJJORb0amhFxJXAXcCtwPvAD4ImIeMNRVvs88BHgj4GpwCXA0xXbHA8sLG/rfOA24O6IuLwn9kGSdOqK3nyeZkS0AD/OzOsq2tYBj2TmxzrpPwVYCbwpM3/axTY/A8zPzEkVbV8Bpmdm09HqaWxsTO/TlCRViohlmdnY2bJeG2lGxEDgAuDJDoueBN7SxWq/A6wH3l4+7LohIr4aESMq+jR1ss3vAo0R8boqlC5JEtC7MwKdBQwAtndo3w68rYt1JgBnA1cB1wAJ3AH8Y0Q0ZearwCjgnzrZZk35M7dWLoiI64HrAWpra1m8eHHpgyZMYOjQoaxYsQKA4cOHM336dJ5+unQkuKamhtmzZ7N8+XJ27doFQGNjI9u3b2fTpk0ATJo0iUGDBrFy5U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kSdLROPesJEkFGZqSJBVkaEqSVJChqWOKiEkRMbKv65CkvuaFQOpURIwA3gf8EfAzSpNFbAUeAR7NzJ/3YXmS1CcMTXUqIu4HpgHfpjSz0nDgPGAqsBn4bGYu6rMCJR2h/DjF3ekf9h5jaOoI5ceu7aZ0D+3TFW1jgVnAdZTmZrwyM/+lzwqVdJiI+Gvg2fLPxszc1Umf4Zl5xBSjKsZzmurMNKAN2N/ekCX/kZkPA++iFKpX9lF9kjqIiKsp/Q/t54FvAp+LiN+NiHMiYnC5z2DgbyLijX1Y6gnNkaaOUP5ifZvSA8B/H/j3zHy1Q58bgQ9m5nl9UKKkDiLiXkoPxfgsMB/4A0ozrK0BFgJPAVOAuzJzYF/VeaJzpKkjlB/6/SfAYOBvgd+PiLER8UsAEfF6YC6laRAl9bGIqKF0dA9DKsIAAADUSURBVOg/M3N9Zt6RmW8EZgJLKAXoPwB3Aw/0XaUnPkea6lJEzAD+FLgU+DmlJ8r8jNJTZbYC12bmT/quQkntIuIMYGRm/mtEDAReqbwgKCKuBB4EGrwW4bUzNHVM5dtP3glcBrxMaYT5cGb+a58WJumoIuI0Sn/nD0bEdZQOzb6+r+s6kRma6paIOK3j+U1J/V9E3AIMyMzP9XUtJzJDU5JOARHxOuCg/9N7fAxNSZIK8upZSZIKMjQlSSrI0JQkqSBDU5KkggxNSZIKMjQlSSro/wNKvgNwl9WFaQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Executing on the IBM Q Experience simulator\n",
    "\n",
    "backend_sim = provider.get_backend('ibmq_qasm_simulator') # We choose the backend\n",
    "\n",
    "job_sim = execute(circ, backend_sim, shots=1024) # We execute the circuit, selecting the number of repetitions or 'shots'\n",
    "\n",
    "result_sim = job_sim.result() # We collect the results\n",
    "\n",
    "counts = result_sim.get_counts(circ) # We obtain the frequency of each result and we show them \n",
    "print(counts) \n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To execute on one of the real quantum computers, we only need to select it as backend. We will use *job_monitor* to have live information on the job status "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Job Status: job has successfully run\n"
     ]
    }
   ],
   "source": [
    "# Executing on the quantum computer\n",
    "\n",
    "backend = provider.get_backend('ibmq_armonk')\n",
    "\n",
    "job_exp = execute(circ, backend=backend)\n",
    "job_monitor(job_exp)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "When the job is done, we can collect the results and compare them to the ones obtaine with the simulator"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjYAAAEyCAYAAADpz5q+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3deXhV1b3/8fc3CSHBJBhCGELCEEAZooEQpFYEHCgVb4UCCuJEKyqioHC9LbZWpfVqnerEdEuvxaGABfXW360DFAoURTCAQZBGEIKMCRIuJBIISdbvj5OkISQhB06mzef1PHnMWXvtdb6bcMjHtdfe25xziIiIiHhBUH0XICIiIhIoCjYiIiLiGQo2IiIi4hkKNiIiIuIZCjYiIiLiGQo2IiIi4hkh9V1AfWrZsqXr2LFjfZchIiINyPr16791zsWWe90qJCTkD0ASmhCob8XA5sLCwvF9+vTJrqzDeR1sOnbsSFpaWn2XISIiDYiZ7Sr/OiQk5A9t2rTpHhsbezgoKEg3f6tHxcXFdvDgwR4HDhz4A3BDZX2UPEVERKqXFBsbe1Shpv4FBQW52NjYI/hmzyrvU4f1i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1U1mAgrbpQIyIi4gVjxozpesEFF/Tu0KHDpU8//XTbiRMnZi1atCgTYObMmXsSExNP9OvXr3tERETva6655qKtW7eGle7boUOHk7169fru888/j7jjjjtOW19T6q233trZpEkT161bt6TY2NjkF154oTXAgAEDjs2YMSNz8uTJ7Zs3b96rc+fOSa+99lpMrR90NepsxgbKLvd+A9/l2x/ju6LpTqCnc26XmT0FXOacu6akfxDwGZAHPFgyzIv4Tk993zlXXHK592ZgLvBfwBXALHwzQ29XV49mbEREpKKazNhI/apuxqZO19g4594ysxjgEaAtvkAy1DlXOvvSFuhcrn+xmf0b8DK+e9fkA0uBqSULh3HO7TSzocAL+C4b3wdMPlOoEREREe+p88XDzrlZ+GZUKts2rpK2/cCNZxhzJZASiPpERESk8dJDMEVERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbBq4J554gtDQUJo0acIPf/jD07a/+OKLmBnh4eGEh4dz9dVXA7B27Vqio6Np2rQpYWFhjBgxomyfvn370rRpU8LDw4mLi2PXrl2njSsiIo3b7NmzW1xxxRVda2PskSNHdpw8eXJcbYx9rurjIZhSQwUFBUyfPp2lS5eSmppKbGws7733HjfccMMp/Vq1akVW1qkPTW/atCkzZszglltuYd++fXTs2LFs3xEjRvCPf/yDsLAw+vXrx0033VT2oLjG5MMPP+SBBx6gqKiI8ePHM23atFO2r1ixgmHDhtGpUycARowYwaOPPsru3bu5/fbbOXDgAEFBQdx999088MADACxatIjHH3+crVu3sm7dOlJTU097XxGRry9+vFafFdU54/EaPSsK4KOPPoqYNm1a/Pbt28OCgoLo3Lnz8RdeeOGbe++9N+fee++t8jEJdeWyyy67eMyYMYemTp1aJ3dv1oxNAzZv3jyaN2/OoEGDiIiIYMCAAcycObNG+/bq1YtbbrkF8D3FPCYmpuzJuQ8//DBhYb5HhQwaNOi0UNQYFBUVcd999/HBBx/w5ZdfsmDBgrLjK+/KK6/k888/5/PPP+fRRx8FfE8sfv7559m6dSuffvopM2fOLNs3KSmJd955hw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JAPr3789XX31FdnY2AElJSZw4cYJt23xLyhISEmjdujVpaWkAREVFkZKSwurVqyksLARgwIABbNmyhUOHDgGQnJxMbm4uO3bsAKBjx460aNGCDRs2ABAdHU1ycjIrV67EOYeZMXDgQNLT0zl8+DAAKSkp5OTkkJmZCZzb52n37t3AoMD/gYvn7d+/PyCfJ2nczLmzzhT+vZHvVNQx4Gbn3KJy7TOBJOfcwDPsP6Ok36AavNdjwBjnXPfq+qWmprrSXwDn4q4Xz3kIz5o2+/H6LqHB6pzxeH2X0GDpM1U1faaqFqjPlJmtd86lBmQwqXN1dirKOVcArAcGV9g0GN/VUYHUC98pKhERETmP1PWpqN8Bb5jZOuBjfFc8xQFzAMzsKeAy59w1pTuYWQ8gFN8anQgz6wXgnPu8ZPuDQCawpaTfrcBwfGtuRERE5DxSp8HGOfeWmcUAj+C718xmYKhzbldJl7acvmDlfaBDudcbS/5rJf8NBZ4D2gH5+ALO9c659wN/BCIiItKQ1fniYefcLGBWFdvGVdLW8QzjPQM8E4jaREREpHHTs6JERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQzFGxERETEMxRsRERExDMUbERERMQz6jzYmNlEM9tpZsfNbL2ZXXmG/peY2UozyzezvWb2qJlZhT4DS8Y6bmY7zGxC7R6FiIiINER1GmzMbDTwEvAk0Bv4BPjAzNpX0T8K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E9wgNETkDMwvBNwv6f865Hc6555xzlwB9gZX4Qs6fgVeAN+qvUpGGRzM2EjBmlgT8CrgB+A7fk9cP4nv6+n5gvHPui/qrUKTxMLNooLVz7p9mFgqcLL+I2MxGAwuAFK1dE/kXBRsJuJJLv68HhgPH8c3ULHLO/bNeCxNp5MwsCN+/20Vmdhe+01DN6rsukYZEwUZqlZkFVVxvIyLnzsymAsHOuWfruxaRhkTBRkSkETKzJkCR/sdB5FQKNiIiIuIZuipKREREPEPBRkRERDxDwUZEREQ8Q8FGREREPEPBRkRERDxDwUZEREQ84/8DuvFGZB+/9xoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result_exp = job_exp.result()\n",
    "counts_exp = result_exp.get_counts(circ)\n",
    "plot_histogram([counts_exp,counts], legend=['Device', 'Simulator'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
